*** Settings ***
Suite Setup       get_config    ${base_url}
Test Setup
Library           RequestsLibrary
Library           XML
Library           json
Library           OperatingSystem
Resource          用户账号管理.txt
Resource          基础关键字.txt
Library           ExcelLibrary
Library           String
Library           Collections
Library           MyLib.py

*** Variables ***
${username}       abobo_gaga
${password}       63d835ed02ba77d775097e0dcda3f577
${base_url}       http://idp.ams.bespinglobal.cn/api

*** Test Cases ***
验证查询角色分类成功
    [Tags]    test
    &{out}    查询角色分类列表
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证查询角色列表成功
    &{out}    查询角色列表
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证创建角色成功
    [Tags]    notest
    ${var_name}    random_num    8
    &{out}    创建角色    测试角色${var_name}    1    2    ${null}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证更新角色成功
    [Tags]    notest
    Comment    创建角色后通过角色名字查找对应的角色ID然后进行更新修改
    ${var_name}    random_num    8
    &{out}    创建角色    测试角色${var_name}    1    2    ${null}
    Should Be Equal As Strings    True    ${out.success}
    &{out}    查询角色列表
    @{abobo}    Set Variable    ${out.result.data}
    : FOR    ${var}    IN    @{abobo}
    \    Exit For Loop If    '${var.name}'=='测试角色${var_name}'
    ${out}    更新角色    测试角色更新${var_name}    2    ${null}    ${var.id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证查询以及删除角色成功
    [Tags]    notest
    Comment    创建角色后通过角色名字查找对应的角色ID然后进行更新修改
    ${var_name}    random_num    8
    &{out}    创建角色    测试角色${var_name}    1    2    ${null}
    Should Be Equal As Strings    True    ${out.success}
    &{out}    查询角色列表
    @{abobo}    Set Variable    ${out.result.data}
    : FOR    ${var}    IN    @{abobo}
    \    Exit For Loop If    '${var.name}'=='测试角色${var_name}'
    ${out}    查询角色    ${var.id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}
    ${out}    删除角色    ${var.id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证创建模板分类成功
    ${var_name}    random_num    5
    &{out}    创建模板分类    测试模板分类${var_name}    2
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证查询模板分类列表成功
    &{out}    查询模板分类列表
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证更新模板分类成功
    Comment    创建模板分类后通过分类名字查找对应的分类ID然后进行更新修改
    ${var_name}    random_num    5
    &{out}    创建模板分类    测试模板分类${var_name}    2
    Should Be Equal As Strings    True    ${out.success}
    &{out}    查询模板分类列表
    @{abobo}    Set Variable    ${out.result.data}
    : FOR    ${var}    IN    @{abobo}
    \    Exit For Loop If    '${var.name}'=='测试模板分类${var_name}'
    ${out}    更新模板分类    测试模板分类更新${var_name}    2    ${var.id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证查询以及删除模板分类成功
    Comment    创建模板分类后通过分类名字查找对应的分类ID然后进行单个模板分类查找和删除
    ${var_name}    random_num    5
    &{out}    创建模板分类    测试模板分类${var_name}    2
    Should Be Equal As Strings    True    ${out.success}
    &{out}    查询模板分类列表
    @{abobo}    Set Variable    ${out.result.data}
    : FOR    ${var}    IN    @{abobo}
    \    Exit For Loop If    '${var.name}'=='测试模板分类${var_name}'
    ${out}    查询模板分类    ${var.id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}
    ${out}    删除模板分类    ${var.id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证查询模板列表成功
    &{out}    查询模板列表
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证查询模板成功（未验证）
    [Tags]    notest
    &{out}    查询模板    ${id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证创建模板成功（未验证）
    [Tags]    notest
    &{out}    创建模板    ${name}    ${catalogId}    ${policy}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证更新模板成功（未验证）
    [Tags]    notest
    &{out}    更新模板    ${name}    ${catalogId}    ${policy}    ${policyType}    ${id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

验证删除模板成功（未验证）
    [Tags]    notest
    ${out}    删除模板    ${id}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-验证添加自定义解释线路
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-001    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-001    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-添加自定义解析线路IP段
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-002    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-002    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-删除自定义解析线路
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-003    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-003    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-删除自定义解析线路IP段
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-004    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-004    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询自定义解析线路
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-005    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-005    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询自定义解析线路IP段
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-006    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-006    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查看主域名的监控项
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-007    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-007    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查看子域名可监控对象
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-008    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-008    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-主域名监控报警信息
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-009    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-009    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-添加主域名监控项
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-010    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-010    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-添加子域名特定监控对象为监控项
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-011    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-011    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询子域名
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-012    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-012    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-监控项操作
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-013    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-013    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-监控项修改
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-014    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-014    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询日志
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-015    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-015    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-添加解析记录
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-016    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-016    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-批量新增、更新导入解析记录
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-017    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-017    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-批量新增导入解析记录
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-018    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-018    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-导出解析记录
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-019    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-019    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询负载均衡
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-020    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-020    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询解析记录
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-021    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-021    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询基础解析线路
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-022    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-022    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-操作解析记录
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-023    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-023    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-设置负载均衡
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-024    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-024    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-更新解析记录
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-025    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-025    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-下载模板
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-026    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-026    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-添加域名
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-027    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-027    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-修改域名
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-028    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-028    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-删除域名
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-029    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-029    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-域名列表
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-030    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-030    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询解析次数
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-031    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-031    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

DNS-查询流量
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    DNS-031    请求数据
    ${api}    get_excel_cell_value    sheet1    DNS-031    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-创建用户/注册用户
    Comment    OK
    ${random_name}    Random Num    8
    ${random_num}    random_int_num     9
    ${data}    get_excel_cell_value    sheet1    IAM-001    请求数据
    &{postdata}    To Json    ${data}
    Set To Dictionary    ${postdata}    name=${random_name}
    Set To Dictionary    ${postdata}    email=${random_num}@qq.com
    ${api}    get_excel_cell_value    sheet1    IAM-001    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询用户列表
    Comment    OK
    ${postdata}    get_excel_cell_value    sheet1    IAM-002    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-002    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询用户
    Comment    ok
    Comment    查询用户列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-002    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-002    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    查询用户
    ${postdata}    get_excel_cell_value    sheet1    IAM-003    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-003    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-更新用户
    Comment    ok
    Comment    查询用户列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-002    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-002    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    更新用户
    ${postdata}    get_excel_cell_value    sheet1    IAM-004    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-004    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-修改密码
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-005    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-005    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-重置用户密码
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-006    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-006    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-审核用户
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-007    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-007    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-启用用户
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-008    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-008    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-禁用用户
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-009    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-009    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-删除用户
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-010    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-010    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-通过token获取用户信息
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-011    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-011    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-创建节点
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-012    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-012    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询节点列表
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-013    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-013    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询节点结构
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-014    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-014    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}
    Comment    Run Keyword And Expect Error    success验证失败    Should Be Equal As Strings    True    ${out.success}

IAM-查询节点
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-015    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-015    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-更新节点
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-016    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-016    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-启用节点
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-017    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-017    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-禁用节点
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-018    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-018    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-删除节点
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-019    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-019    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-创建审批流
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-020    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-020    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询审批流列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-021    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-021    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询审批流
    Comment    查询审批流列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-021    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-021    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    查询审批流
    ${postdata}    get_excel_cell_value    sheet1    IAM-022    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-022    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-更新审批流
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-023    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-023    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-删除审批流
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-024    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-024    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-获取审批流明细列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-025    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-025    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-获取用户相关的审批流明细列表
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-026    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-026    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-通过审批流
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-027    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-027    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-拒绝审批流
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-028    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-028    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-批量审核审批流
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-029    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-029    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-创建Project
    ${randonm_str}    Random Num    10
    ${postdata}    get_excel_cell_value    sheet1    IAM-030    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-030    API
    &{data}    To Json    ${postdata}
    Set To Dictionary    ${data}    name=${randonm_str}
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${data}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询Project列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-031    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-031    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询Project
    Comment    查询列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-031    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-031    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    查询project
    ${postdata}    get_excel_cell_value    sheet1    IAM-032    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-032    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-更新Project
    ${randonm_str}    Random Num    10
    ${postdata}    get_excel_cell_value    sheet1    IAM-033    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-033    API
    &{data}    To Json    ${postdata}
    Set To Dictionary    ${data}    name=${randonm_str}
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${data}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${data}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-删除Project
    Comment    查询列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-031    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-031    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    删除
    ${postdata}    get_excel_cell_value    sheet1    IAM-034    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-034    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-更新Project关联对象
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-035    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-035    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询Project关联列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-036    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-036    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-创建用户组
    ${postdata}    get_excel_cell_value    sheet1    IAM-037    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-037    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询用户组列表
    ${api}    get_excel_cell_value    sheet1    IAM-038    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询用户组
    Comment    OK
    ${api}    get_excel_cell_value    sheet1    IAM-038    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    ${api}    get_excel_cell_value    sheet1    IAM-039    API
    ${api}    Replace String    ${api}    {id}    ${id}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-编辑用户组
    ${api}    get_excel_cell_value    sheet1    IAM-038    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    编辑用户组
    ${postdata}    get_excel_cell_value    sheet1    IAM-040    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-040    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-更新用户组用户
    ${postdata}    get_excel_cell_value    sheet1    IAM-041    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-041    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-删除用户组
    Comment    查询用户组
    ${api}    get_excel_cell_value    sheet1    IAM-038    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    删除用户组
    ${postdata}    get_excel_cell_value    sheet1    IAM-042    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-042    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-添加用户组用户
    ${postdata}    get_excel_cell_value    sheet1    IAM-043    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-043    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询用户组用户列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-044    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-044    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-批量删除用户组用户
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    IAM-045    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-045    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询资源
    Comment    查询资源列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-048    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-048    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    查询资源
    ${postdata}    get_excel_cell_value    sheet1    IAM-046    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-046    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询资源详情
    Comment    查询资源列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-048    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-048    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result.data[0].id}
    Comment    查询资源详情
    ${postdata}    get_excel_cell_value    sheet1    IAM-047    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-047    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

IAM-查询资源列表
    ${postdata}    get_excel_cell_value    sheet1    IAM-048    请求数据
    ${api}    get_excel_cell_value    sheet1    IAM-048    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

auth-验证单点登录
    ${postdata}    get_excel_cell_value    sheet1    auth-001    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-001    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

auth-验证网页注销单点登录
    Comment    登陆
    ${postdata}    get_excel_cell_value    sheet1    auth-001    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-001    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    Comment    注销登陆
    ${postdata}    get_excel_cell_value    sheet1    auth-002    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-002    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

auth-验证token有效性
    ${postdata}    get_excel_cell_value    sheet1    auth-003    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-003    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

auth-验证获取登录用户信息
    ${postdata}    get_excel_cell_value    sheet1    auth-004    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-004    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

auth-验证登录后换取code
    Comment    登陆
    ${postdata}    get_excel_cell_value    sheet1    auth-001    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-001    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    Should Be Equal As Strings    True    ${out.success}
    Comment    登陆后换取code
    ${postdata}    get_excel_cell_value    sheet1    auth-005    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-005    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

auth-验证api注销单点登录
    ${postdata}    get_excel_cell_value    sheet1    auth-006    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-006    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

auth-验证扫码登录-生成二维码
    ${postdata}    get_excel_cell_value    sheet1    auth-009    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-009    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

auth-验证扫码登录-验证二维码扫码结果
    Comment    生成二维码
    ${postdata}    get_excel_cell_value    sheet1    auth-009    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-009    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${ticket}    Set Variable    ${out.result.ticket}
    Comment    验证二维码扫码结果
    ${postdata}    get_excel_cell_value    sheet1    auth-010    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-010    API
    ${api}    Replace String    ${api}    {ticket}    ${ticket}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    Comment    Should Be Equal As Strings    True    ${out.success}
    Comment    Should Be Equal As Integers    1    ${out.result.code}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Integers    1    ${out.result.code}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段code为1，验证失败，错误信息： ${returnvalue} \n接口返回值：${out} \n请求API：${api} \n请求参数：${postdata}

auth-验证扫码登录-确认登录
    Comment    生成二维码
    ${postdata}    get_excel_cell_value    sheet1    auth-009    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-009    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${ticket}    Set Variable    ${out.result.ticket}
    Comment    确认登陆
    ${postdata}    get_excel_cell_value    sheet1    auth-011    请求数据
    ${api}    get_excel_cell_value    sheet1    auth-011    API
    ${api}    Replace String    ${api}    {ticket}    ${ticket}
    &{data}    To Json    ${postdata}
    Set To Dictionary    ${data}    ticket=${ticket}
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${data}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-新增云商产品
    [Tags]    notest
    Comment    查询未关联产品的云商ID
    ${postdata}    get_excel_cell_value    sheet1    PMS-041    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-041    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result[0].id}
    Comment    新增云商产品
    ${postdata}    get_excel_cell_value    sheet1    PMS-026    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-026    API
    &{data}    To Json    ${postdata}
    Set To Dictionary    ${data}    supplierId=${id}
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${data}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${data}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-管理端获取云商产品列表
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    PMS-027    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-027    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-客户端获取云商产品列表
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    PMS-028    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-028    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-产品推荐
    ${postdata}    get_excel_cell_value    sheet1    PMS-029    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-029    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-产品取消推荐
    ${postdata}    get_excel_cell_value    sheet1    PMS-030    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-030    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-删除云商产品
    [Tags]    notest
    Comment    查询云商产品
    ${postdata}    get_excel_cell_value    sheet1    PMS-027    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-027    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    ${id}    Set Variable    ${out.result[0].productId}
    Comment    删除云商产品
    ${postdata}    get_excel_cell_value    sheet1    PMS-031    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-031    API
    ${api}    Replace String    ${api}    {id}    ${id}
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Delete Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-发布产品组
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    PMS-032    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-032    API
    &{myheader}    Create Dictionary    authorization=${token}    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-修改产品属性
    ${postdata}    get_excel_cell_value    sheet1    PMS-033    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-033    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-新增产品属性
    ${postdata}    get_excel_cell_value    sheet1    PMS-034    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-034    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-查询复合属性下拉列表数据
    ${postdata}    get_excel_cell_value    sheet1    PMS-035    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-035    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-查询产品计费策略信息
    ${postdata}    get_excel_cell_value    sheet1    PMS-036    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-036    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-修改产品计费策略信息
    ${postdata}    get_excel_cell_value    sheet1    PMS-037    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-037    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Put Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-续费价格查询
    ${postdata}    get_excel_cell_value    sheet1    PMS-038    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-038    API
    &{myheader}    Create Dictionary    Content-Type=application/json    authorization=${token}
    ${resp}    Post Request    ${session}    ${api}    data=${postdata}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求参数：${postdata}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-管理端根据productCode查询关联云商
    ${postdata}    get_excel_cell_value    sheet1    PMS-039    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-039    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-客户端查询所有的云商产品
    ${postdata}    get_excel_cell_value    sheet1    PMS-040    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-040    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-查询未关联产品的云商
    [Tags]    notest
    ${postdata}    get_excel_cell_value    sheet1    PMS-041    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-041    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

PMS-查看控制台用户产品中心
    ${postdata}    get_excel_cell_value    sheet1    PMS-042    请求数据
    ${api}    get_excel_cell_value    sheet1    PMS-042    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}，\n请求参数：${postdata}

OPC-验证费用中心-查询订单列表
    ${postdata}    get_excel_cell_value    sheet1    OPC-078    请求数据
    ${api}    get_excel_cell_value    sheet1    OPC-078    API
    &{myheader}    Create Dictionary    authorization=${token}
    ${resp}    Get Request    ${session}    ${api}    headers=&{myheader}
    &{out}    To Json    ${resp.text}
    log    请求API：${api}
    log    接口返回值：${out}
    ${result}    ${returnvalue}    Run Keyword And Ignore Error    Should Be Equal As Strings    True    ${out.success}
    Run Keyword If    '${result}'=='FAIL'    Fail    验证返回值字段success为True，验证失败，错误信息： ${returnvalue}, \n接口返回值：${out}, \n请求API：${api}
